package com.chap9;
import java.awt.*;
import javax.swing.*;
public class demo9_2 {
    public static void main(String[] args) {
        MyFrame win=new MyFrame();
    }
}
class MyFrame extends JFrame{
    public MyFrame(){
        setTitle("MyWindow");
        this.setSize(400,500);
        this.setLocation(300,300);
        this.setVisible(true);
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }
}